%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%载入常用的packages
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{verbatim}
\usepackage{color}
\usepackage{fontspec,xltxtra,xunicode}
\usepackage{dsfont}
\usepackage{url} 
\usepackage{bm}
\usepackage{multicol}
\usepackage{fancyvrb}
\usepackage{tikz}
\usetikzlibrary{graphs}
\usepackage{pythonhighlight}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%加入R语言等代码
\usepackage{listings}
\lstset{numbers=none,
numberstyle=\tiny,
keywordstyle=\color{blue!70}, commentstyle=\color{red!50!green!50!blue!50},
frame=shadowbox,
rulesepcolor=\color{red!20!green!20!blue!20},
basicstyle=\ttfamily\small,
escapeinside=`', %将中文放在`和'之间，可以在lstlisting环境中准确的显示中文
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%使表格美观
\usepackage{array}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
%\newcolumntype{N}{@{}m{0pt}@{}}
\setlength\extrarowheight{3pt}
\renewcommand{\tablename}{表}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%将文档标题和作者往上移动
%you should use package setspace for the vertical spacing. 
%The distance between two equations is set by the short skips!
\usepackage{setspace}%\onehalfspacing
\AtBeginDocument{%
  \addtolength\abovedisplayskip{-0.5\baselineskip}%
  \addtolength\belowdisplayskip{-0.3\baselineskip}%
%  \addtolength\abovedisplayshortskip{-0.5\baselineskip}%
%  \addtolength\belowdisplayshortskip{-0.5\baselineskip}%
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 给数字或字母加圆圈
\newcommand*\mycirc[1]{%
   \begin{tikzpicture}
     \node[draw,circle,inner sep=1pt] {#1};
%     \node[draw, circle, inner sep=0pt] {#1};
   \end{tikzpicture}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 给每页幻灯片都加上背景图片
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
%Global Background must be put in preamble
%\usebackgroundtemplate%
%{%
%    \includegraphics[width=\paperwidth,height=\paperheight]{pic/mars-pathfinder-2.jpg}%
%}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%设置文档的字体 11111
%\setCJKmainfont{Songti SC}

%\defaultfontfeatures{Mapping=tex-text}
%\setromanfont[Mapping=tex-text]{Hoefler Text}
%\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}
%\setmonofont[Scale=MatchLowercase]{Andale Mono}
%\setmainfont{Kai}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%设置文档的字体 22222
%\defaultfontfeatures{Mapping=tex-text}
%%\setromanfont{Heiti SC} %设置中文字体
%\setromanfont{Songti SC} %设置中文字体
%%\setromanfont{Songti TC Bold} %设置中文字体
%
%\XeTeXlinebreaklocale “zh”
%\XeTeXlinebreakskip = 0pt plus 0pt minus 0.1pt %文章内中文自动换行，可以自行调节
%
%%\newfontfamily{\H}{Songti SC} %设定新的字体快捷命令
%%\newfontfamily{\H}{Heiti SC} %设定新的字体快捷命令
%%\newfontfamily{\E}{Weibei SC} %设定新的字体快捷命令


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%设置文档的字体 33333
%\usepackage{ctex}
%\usepackage{fontspec}
%\setmainfont[Mapping=tex-text]{Kaiti SC}   % {STSong}表示宋体

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%设置文档的字体 44444
\usepackage{fontspec}
%\setmainfont[Mapping=tex-text]{Times New Roman} 
%\setmainfont[Mapping=tex-text]{Songti SC} 
%\setmainfont[Mapping=tex-text]{Libian SC} 

\setmainfont{Papyrus} % 西文默认字体，默认值 Times New Roman 
\setsansfont{Papyrus} % 西文默认无衬线字体，如大标题等。常用 Helvetica/Arial 
%\setmonofont{ } % 西文默认等宽字体，如程序代码 


\usepackage{xeCJK}
\newfontfamily{\ppr}{Papyrus}
\newfontfamily{\lib}{Libian SC}

%\setCJKmainfont{STHeiti}
%\setCJKmainfont{Hei}

%\setCJKmainfont{STSong}
%\setCJKmainfont{STFangsong}
%\setCJKmainfont{Songti SC}
%\setCJKmainfont{SimSong}

%\setCJKmainfont{Kai}
%\setCJKmainfont{Kaiti SC}
%\setCJKmainfont{STKaiti}
%\setCJKmainfont{Xingkai SC}

%\setCJKmainfont{Yuanti SC}
%\setCJKmainfont{Weibei SC}
\setCJKmainfont{Libian SC}
%\setCJKmainfont{Baoli SC}
%\setCJKmainfont{PingFang SC}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



